package org.zoomdev.zoom.web.view.impl;

import org.zoomdev.zoom.web.utils.ResponseUtils;
import org.zoomdev.zoom.web.view.View;

import javax.servlet.http.HttpServletResponse;

public final class StringView implements View {

    private final String str;

    public StringView(String str) {
        this.str = str;
    }

    @Override
    public void render(HttpServletResponse response) throws Exception {
        ResponseUtils.writeString(response, str);
    }

    public String getStr() {
        return str;
    }

}
